﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;

namespace DAL
{
    public class AddGoods
    {
        public static bool insert(GoodsModel goods)
        {
            String sql = $"INSERT INTO [dbo].[Goods](g_Name,t_ID,g_Price,g_Discount,g_Number,g_ProduceDate" +
                $",g_Image,g_Status,g_Description) VALUES('{goods.g_Name}',{goods.t_ID},{goods.g_Price}," +
                $"{goods.g_Discount},{goods.g_Number},'{goods.g_ProduceDate}','{goods.g_Image}','{goods.g_Status}','{goods.g_Description}')";
            return DBHelper.query(sql);
        }
    }
}
